package com.chixing.day08_interface;

public class InterfaceDemo {
    public static void main(String[] args) {
        String s1 = "file";
        String s2 = "edit";
        int result = s1.compareTo(s2);   //比较两个字母的字典顺序 若字母相同 一次后推 直到找到不相等的
        System.out.println(result);

        Product product1 = new Product("杯子",2000,5);
        Product product2 = new Product("手机",3000,2000);
        int result1 = product1.compareTo(product2);
        System.out.println(result1);

    }




}
